package com.mcc.common.core.domain.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 菜单权限表 sys_menu
 *
 * @author gxy
 */
@ApiModel("菜单对象")
@Data
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty("菜单ID")
    private Long menuId;

    @ApiModelProperty("菜单名称")
    private String menuName;

    @TableField(exist = false)
    @ApiModelProperty("父菜单名称")
    private String parentName;

    @ApiModelProperty("父菜单ID")
    private Long parentId;

    @ApiModelProperty("显示顺序")
    private String orderNum;

    @ApiModelProperty("路由地址")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    @ApiModelProperty("是否为外链（0是 1否）")
    private String isFrame;

    @ApiModelProperty("是否缓存（0缓存 1不缓存）")
    private String isCache;

    @ApiModelProperty("类型（M目录 C菜单 F按钮）")
    private String menuType;

    @ApiModelProperty("显示状态（0显示 1隐藏）")
    private String visible;

    @ApiModelProperty("菜单状态（0显示 1隐藏）")
    private String status;

    @ApiModelProperty("权限字符串")
    private String perms;

    @ApiModelProperty("菜单图标")
    private String icon;

    @TableField(exist = false)
    @ApiModelProperty("子菜单")
    private List<SysMenu> children = new ArrayList<SysMenu>();

    @ApiModelProperty("创建者")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("是否新窗口打开（0否 1是）")
    private Integer isNewOpen;

    @ApiModelProperty("是否全屏（0否 1是）")
    private Integer isFullscreen;
}
